﻿#include "music.h"
#include <QUuid>
#include <QMediaPlayer>

Music::Music()
	: isLike_(false)
	, isHistory_(false)
{

}

Music::Music(QUrl url)
	: isLike_(false)
	, isHistory_(false)
	, musicUrl_(url)
{
	musicId_ = QUuid::createUuid().toString();
}

void Music::setMusicName(const QString& musicName) {
	musicName_ = musicName;
}

void Music::setMusicSinger(const QString& musicSinger) {
	musicSinger_ = musicSinger;
}

void Music::setMusicAlbum(const QString& musicAlbum) {
	musicAlbumn_ = musicAlbum;
}

void Music::setMusicDuration(qint64 duration) {
	duration_ = duration;
}

void Music::setIsLike(bool isLike) {
	isLike_ = isLike;
}

void Music::setIsHistory(bool isHistory) {
	isHistory_ = isHistory;
}

void Music::setMusicUrl(QUrl musicUrl) {
	musicUrl_ = musicUrl;
}

QString Music::getMusicName()const {
	return musicName_;
}

QString Music::getMusicSinger()const {
	return musicSinger_;
}

QString Music::getMusicAlbum()const {
	return musicAlbumn_;
}

qint64 Music::getMusicDuration()const {
	return duration_;
}

bool Music::getIsLike()const {
	return isLike_;
}

bool Music::getIsHistory()const {
	return isHistory_;
}

QUrl Music::getMusicUrl()const {
	return musicUrl_;
}

QString Music::getmusicId()const {
	return musicId_;
}